Use intersection types in Object.assign defintion#4573
Closed
mhegazy wants to merge 3 commits into
Closed
Conversation
Member
There was a problem hiding this comment.
"source objects" -> "source object"
"to copy properties from" -> "from which to copy properties"
Contributor
There was a problem hiding this comment.
Er... "to copy properties from" is indeed better I believe.
Member
There was a problem hiding this comment.
If you make this take a T and U array, then users can specifically pass in a union type for their U
Member
There was a problem hiding this comment.
@DanielRosenwasser But then the resulting type would follow the pattern T & (U1 | U2 | U3 ... ) which I don't think is what you want.
Contributor
There was a problem hiding this comment.
You'd need something like the proposal in #3870.
Contributor
|
👍 |
Contributor
Author
|
merged manually. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.